package edu.cuit.svsp.util;

import lombok.Data;

import java.util.HashSet;
import java.util.UUID;


@Data
public class KeyUtil {
    private static final HashSet<String> KEYS_SET = new HashSet<>();

    public static String getKey(){
        String key = UUID.randomUUID().toString();
        KEYS_SET.add(key);
        return key;
    }

    public static boolean removeKey(String key){
        return KEYS_SET.remove(key);
    }
}